var serialnum = {
	$n : 0,
	get next() { return this.$n++; },
	set next(n) {
		if(n >= this.$n) this.$n = n;
		else throw "序列号的值不能比当前值小";
	},
	set r(n) { return this.$n = n; },
};

console.log(serialnum.next);
serialnum.next = 5
console.log(serialnum.next);
console.log(serialnum.$n)
serialnum.$n = 8
console.log(serialnum.$n)
console.log(serialnum.r = 10)
console.log(serialnum.r)
console.log(serialnum.$n)

a = {}
function xxx(item) {
    item['a'] = 'b';
    this.i = this.i || 1;
    console.log(i, '--------------------');
    ++i;
}

xxx(a);
console.log(a, this, '--------------');
xxx(a);
xxx(a);
xxx(a);
xxx(a);
xxx(a);
console.log(this, '---', i)
